package com.xish.api.shop;

import com.xish.api.FormParser;
import com.xish.api.shop.form.ShopEditForm;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by zhanghuyi on 15/7/28.
 */
@Component
public class ShopFormParser extends FormParser{

    /**
     * 商户资料编辑 解析
     * */
    public ShopEditForm parseShopEditForm(HttpServletRequest request){
        ShopEditForm form = new ShopEditForm();
        form.setTitle(readRequestParam(request, "title", ""));
        form.setCity_id(readRequestParam(request, "city_id", ""));
        form.setSummary(readRequestParam(request, "summary", ""));
        form.setPhone(readRequestParam(request, "phone", ""));
        return form;
    }


}
